package com.fdb.efp.nls.service.impl.basicfn;

import com.fdb.efp.nls.service.facade.basicfn.FailurePartnerCooprStatusService;
import com.fdb.efp.cus.service.facade.PartnerInfoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.time.LocalDate;

/**
 * 需求编号【2019D0509】
 * 终止 合作日期到期的合作方信息
 * @author qiuyf
 * @version 0.1 初始为0.1,后续变更则修改
 * @since 2019/12/9 10:50
 */
@Service("failurePartnerCooprStatusService")
public class FailurePartnerCooprStatusServiceImpl implements FailurePartnerCooprStatusService {

    private Logger logger = LoggerFactory.getLogger("FailurePartnerCooprStatusServiceImpl");

    @Autowired
    @Qualifier("partnerInfoService")
    private PartnerInfoService partnerInfoService;

    @Override
    public Boolean inValidPartnerOverCooprEndDt() {
        logger.info("======>终止合作日期到期的合作方信息开始，当前日期为:<======" + LocalDate.now());
        int num = partnerInfoService.inValidPartnerOverCooprEndDt();
        logger.info("======>终止合作日期到期的合作方信息结束，终止的合作方信息条数为:<======" +num);
        return true;
    }
}
